
#include "xdns.h"
#include <arpa/inet.h>

using namespace std;

XdnsConfig::XdnsConfig(unsigned short serverPort,
                       const string& serverIpAddress)
: m_serverPort(htons(serverPort)),
  m_serverIpAddress(serverIpAddress)
{
}

XdnsConfig::XdnsConfig(const XdnsConfig& anotherConfig)
: m_serverPort(anotherConfig.m_serverPort),
  m_serverIpAddress(anotherConfig.m_serverIpAddress)
{
}

XdnsConfig::~XdnsConfig()
{
}

XdnsConfig&
XdnsConfig::operator=(const XdnsConfig& anotherConfig)
{
    if ((&anotherConfig) != this)
    {
        this->m_serverPort = anotherConfig.m_serverPort;
        this->m_serverIpAddress = anotherConfig.m_serverIpAddress;
    }

    return *this;
}

